package com.liufei1988.design.openAndClosing;

import java.util.ArrayList;
import java.util.List;

public class Alert {
    private List<AlertHandler> alertHandlerList=new ArrayList<AlertHandler>();

    public void addAlertHandler(AlertHandler alertHandler){
        this.alertHandlerList.add(alertHandler);
    }

    public void check(ApiStatInfo apiStatInfo){
        for (AlertHandler handler:alertHandlerList){
            handler.check(apiStatInfo);
        }
    }
}
